import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.HashSet;
import java.util.Set;

public class ExtractCharacters {

	public static String getNumber(String num) {
		char c = num.charAt(0);
		int i = 1;
		while (i < num.length() && num.charAt(i) != '.')
			i++;
		boolean trailingzerosEnd = false;
		int j = 0;
		while (!trailingzerosEnd && j < num.length()) {
			c = num.charAt(j);
			if (c != '0') {
				trailingzerosEnd = true;
				break;
			}
			j++;
		}
		String buffer = "";
		if (j == num.length())
			return "0";
		if (num.charAt(j) == '.')
			buffer = "0";
		for (; j < num.length(); j++)
			buffer += num.charAt(j);
		boolean hasFraction = false;
		for (i = 0; i < buffer.length(); i++) {
			if (buffer.charAt(i) == '.') {
				hasFraction = true;
				break;
			}
		}
		if (!hasFraction)
			return buffer;
		j = buffer.length() - 1;
		while (j > i + 1) {
			if (buffer.charAt(j) != '0')
				break;
			j--;
		}
		String ret = "";
		for (i = 0; i <= j; i++)
			ret += buffer.charAt(i);
		return ret;
	}

	static HashSet<Character> javaCharacters = new HashSet<Character>();
	static {
		for (int i = 0; i < 128; i++)
			javaCharacters.add(new Character((char) i));
	}

	/**
	 * Returns a string ret that is defined as follows: ret[i]=s[i] if s[i] is
	 * in <code>valid</code> ret[i]= <space cahracter> if s[i] is not in
	 * <code>valid</code>
	 */
	public static String getValidCharacters(Set<Character> valid, String s) {
		String ret = "";
		for (int i = 0; i < s.length(); i++)
			if (valid.contains(new Character(s.charAt(i))))
				ret += s.charAt(i);
			else
				ret += " ";
		return ret;
	}

	public static void main(String[] args) throws IOException {
		String num="00.0";
		System.out.println(getNumber(num));
	}
}
